package com.mapper;

import java.util.List;

import com.bean.Stock;

public interface StockMapper {
    int deleteByPrimaryKey(Integer stockId);
    
   /**
    * 出库  入库
    * @param record
    * @return
    */
    int insert(Stock record);
    
    /*
     *	查询库存
     */
    Double selectQuantityByMaterialId(Integer materialId);
    
    /**
     * 查询入库记录
     * @return
     */
    List<Stock> selectByQuantityMoreOne();
    
    /**
     * 查询出库记录
     * @return
     */
    List<Stock> selectByQuantityLessOne();
    
    /**
     * 根据商品编码或名称查询库存
     * @return
     */
    List<Stock> selectByMaterialIdOrMaterialName(String searchWords);
    
    /**
     * 查询仓库中的所有库存
     * @return
     */
    List<Stock> selectAllStock();
    
    
    List<Stock> selectByState(Integer state);
    
    int updateByStateZero(Stock record);
    

    int insertSelective(Stock record);

    Stock selectByPrimaryKey(Integer stockId);

    int updateByPrimaryKeySelective(Stock record);

    int updateByPrimaryKey(Stock record);
}